<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="format-detection" content="telephone=no" />
	<title>swiper</title>
<link rel="stylesheet" href="swiper.min.css">
<style>
	
    html, body {
        position: relative;
        height: 100%;
    }
    body {
        background: #eee;
        font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
        font-size: 14px;
        color:#000;
        margin: 0;
        padding: 0;
    }
    .swiper-container {
        width: 100%;
        height: 200px;
        margin-left: auto;
        margin-right: auto;
    }
    .swiper-slide {
        text-align: center;
        font-size: 18px;
        background: #fff;

        /* Center slide text vertically */
        display: -webkit-box;
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
        -webkit-box-align: center;
        -ms-flex-align: center;
        -webkit-align-items: center;
        align-items: center;
    }
    .popup-swiper-wrap {top: -100%; left: 0; margin-left: auto; margin-right: auto; width: 100%; height: 100%; position: absolute;}
    .mask {width: 100%; height: 100%; position: absolute; top: 0; left: 0;  margin-left: auto; margin-right: auto; background: rgba(0,0,0,0.4); z-index: 11;}
    .swiper-popup {width: 100%; height: 200px; margin-left: auto; margin-right: auto; z-index: 12; top: 250px;}

</style>
</head>
<body>
    <!-- Swiper -->
    <div class="swiper-main swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide">Slide 1</div>
            <div class="swiper-slide">Slide 2</div>
            <div class="swiper-slide">Slide 3</div>
            <div class="swiper-slide">Slide 4</div>
            <div class="swiper-slide">Slide 5</div>
            <div class="swiper-slide">Slide 6</div>
            <div class="swiper-slide">Slide 7</div>
            <div class="swiper-slide">Slide 8</div>
            <div class="swiper-slide">Slide 9</div>
            <div class="swiper-slide">Slide 10</div>
        </div>
        <!-- Add Pagination -->
        <div class="swiper-pagination"></div>
        <!-- Add Arrows -->
        <div class="swiper-button-next"></div>
        <div class="swiper-button-prev"></div>
    </div>

	<div class="popup-swiper-wrap">
		<div class="mask"></div>
		<div class="close"></div>
	    <div class="swiper-popup swiper-container">
	        <div class="swiper-wrapper">
	            <div class="swiper-slide">Slide 1</div>
	            <div class="swiper-slide">Slide 2</div>
	            <div class="swiper-slide">Slide 3</div>
	            <div class="swiper-slide">Slide 4</div>
	            <div class="swiper-slide">Slide 5</div>
	            <div class="swiper-slide">Slide 6</div>
	            <div class="swiper-slide">Slide 7</div>
	            <div class="swiper-slide">Slide 8</div>
	            <div class="swiper-slide">Slide 9</div>
	            <div class="swiper-slide">Slide 10</div>
	        </div>
	        <!-- Add Pagination -->
	        <div class="swiper-pagination"></div>
	        <!-- Add Arrows -->
	        <div class="swiper-button-next"></div>
	        <div class="swiper-button-prev"></div>
	    </div>
    </div>


    <!-- Swiper JS -->
    <script src="jquery-1.10.1.min.js"></script>
    <script src="swiper-3.4.2.jquery.min.js"></script>

    <!-- Initialize Swiper -->
    <script>
    var swiper = new Swiper('.swiper-container', {
        pagination: '.swiper-pagination',
        nextButton: '.swiper-button-next',
        prevButton: '.swiper-button-prev',
        slidesPerView: 1,
        paginationClickable: true,
        spaceBetween: 30,
        loop: true
    });
    var swiper = new Swiper('.swiper-popup', {
        pagination: '.swiper-pagination',
        nextButton: '.swiper-button-next',
        prevButton: '.swiper-button-prev',
        slidesPerView: 1,
        paginationClickable: true,
        spaceBetween: 30,
        loop: true
    });
    $('.swiper-main .swiper-slide').on('click', function () {
    	$('.popup-swiper-wrap').css({top: '0px'});
    });
    $('.popup-swiper-wrap .mask').on('click', function (e) {
    	e.preventDefault();
    	$('.popup-swiper-wrap').css({top: '-100%'});
    })
    </script>
</body>
</html>